Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use xbuild instead of cargo apk in the CI #3086

Closed
wants to merge 13 commits into from
Closed

Conversation

notgull
Copy link
Member

@notgull notgull commented Sep 4, 2023

In addition to cargo apk being deprecated, xbuild also has support for ios.

  • Tested on all platforms changed
  • Added an entry to CHANGELOG.md if knowledge of this change could be valuable to users
  • Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
  • Created or updated an example program if it would help users understand this functionality
  • Updated feature matrix, if new features were added or implemented

Copy link
Member

@madsmtm madsmtm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, I didn't know it was deprecated. Do you have a reference on why?

xbuild-target/README.md Outdated Show resolved Hide resolved
@notgull
Copy link
Member Author

notgull commented Sep 4, 2023

Huh, I didn't know it was deprecated. Do you have a reference on why?

Yes, cargo apk is deprecated, see rust-mobile/cargo-apk#31 (comment)

@notgull
Copy link
Member Author

notgull commented Sep 5, 2023

CI is taking a while to be queued. What's that about?

@madsmtm
Copy link
Member

madsmtm commented Sep 5, 2023

@notgull
Copy link
Member Author

notgull commented Sep 10, 2023

The CI error is #3093

@kchibisov
Copy link
Member

r @rib @MarijnS95

@notgull
Copy link
Member Author

notgull commented Oct 8, 2023

@MarijnS95 Any chance you can review this in the near future?

xbuild-target/Cargo.toml Outdated Show resolved Hide resolved
xbuild-target/README.md Outdated Show resolved Hide resolved
fn main() {
winit::event_loop::EventLoop::new()
.unwrap()
.run(|_, _| todo!())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A real implementation is probably provided by the example that was being compiled before? I'd rather test that, including the part that forwards android_activity::AndroidApp into winit.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added an actual Android winit app, but it looks like there is a linker error that doesn't occur on my machine.

.github/workflows/ci.yml Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
.github/workflows/ci.yml Show resolved Hide resolved
.github/workflows/ci.yml Outdated Show resolved Hide resolved
xbuild-target/README.md Outdated Show resolved Hide resolved
@MarijnS95
Copy link
Member

@notgull sure, done. I've been out of the country for quite some time, only got to you r? now.

@notgull
Copy link
Member Author

notgull commented Oct 8, 2023

I'm not getting the linker error on my machine

- name: Build and package crate for Android
if: contains(matrix.platform.target, 'android')
# TODO: Figure out why this build fails on Github Actions
run: x build -p ios-xbuild-target --platform android --arch arm64
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does it work? Does it simply abort now or it builds, but not with android target?

android-xbuild-target/Cargo.toml Outdated Show resolved Hide resolved
Comment on lines 1 to 3
# android-xbuild-target

This is a crate that can be built via `x build` in order to simplify CI testing.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should create a common xbuild dir and put these 2 crates there with common docs.

android-xbuild-target/Cargo.toml Outdated Show resolved Hide resolved
In addition to cargo apk being deprecated, xbuild also has support for
ios.

Signed-off-by: John Nunley <[email protected]>
Signed-off-by: John Nunley <[email protected]>
Signed-off-by: John Nunley <[email protected]>
Signed-off-by: John Nunley <[email protected]>
Signed-off-by: John Nunley <[email protected]>
Signed-off-by: John Nunley <[email protected]>
Signed-off-by: John Nunley <[email protected]>
@@ -0,0 +1,9 @@
[package]
name = "ios-xbuild-target"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: given the directory structure I'd name these xbuild-ios-target. After all, xbuild is targeting an architecture, the architecture isn't targeting xbuild.

Copy link
Member

@MarijnS95 MarijnS95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just unfortunate that we cannot have xbuild target examples yet :/

@notgull
Copy link
Member Author

notgull commented Feb 1, 2024

Closing for now as this is blocked on rust-mobile/xbuild#158

@notgull notgull closed this Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

5 participants